const initialData = {
  userInfo: {
    name: 'wn',
    age: 18
  }
}

const userReducer = (state = initialData, action) => {
  switch (action.type) {
    case 'set_userinfo':
      return {
        ...state,
        userInfo: action.userInfo
      }
    default:
      return state
  }
}

export default userReducer